#ifndef __GLOGLOGGING_H
#define __GLOGLOGGING_H
#include <logger.h>
#include <string>
#include <map>
class LogConfig final
{
    const std::string configpath_;
    LogConfig(const std::string &configpath);
    std::map<std::string, std::string> configmap_;
    static LogConfig *pconfigins;

public:
    ~LogConfig();
    int ParseConfig();
    static LogConfig *GetInstance();
    std::string GetItem(const std::string &item);
};

class GlogLogger final : public Logger
{
private:
    GlogLogger(LogConfig *conf);
    static GlogLogger *pins;
    int Init();

public:
    ~GlogLogger();
    static GlogLogger *GetInstance();
    void Write(int mod, int level, const char *log) const;
};
#endif
